﻿using System.Collections.Generic;
using Dost.Khcn.Data.EntityModel;
using Dost.Khcn.Data.Implements;
using Dost.Khcn.Data.Interfaces;

namespace Dost.Khcn.Biz
{
    public class DeTaiCapTinhBiz
    {
        #region Properties

        private IDeTaiCapTinhDao _deTaiCapTinhDao;

        private IDeTaiCapTinhDao DeTaiCapTinhData
        {
            get
            {
                return (_deTaiCapTinhDao ?? (_deTaiCapTinhDao = new DeTaiCapTinhDao()));
            }
        }

        #endregion

        public List<DeTaiCapTinhView> GetDeTaiCapTinhViews(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : DeTaiCapTinhData.GetDeTaiCapTinhViews(chuyenGiaId);
        }

        public List<DeTaiCapTinh> GetDeTaiCapTinhs(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : DeTaiCapTinhData.GetDeTaiCapTinhs(chuyenGiaId);
        }

        public DeTaiCapTinh Create(DeTaiCapTinh deTaiCapTinh)
        {
            return DeTaiCapTinhData.Create(deTaiCapTinh);
        }

        public void Update(DeTaiCapTinh deTaiCapTinh)
        {
            DeTaiCapTinhData.Update(deTaiCapTinh);
        }

        public void Delete(int id)
        {
            DeTaiCapTinhData.Delete(id);
        }
    }
}
